package cn.lanca.gof0_5._04abstract_factory.service.impl;


import com.example.demo.gof0_5._04abstract_factory.service.Animal;
import com.example.demo.gof0_5._04abstract_factory.service.Farm;
import com.example.demo.gof0_5._04abstract_factory.service.Plant;

/**
 * 具体工厂：韶关农场类
 *
 * @author meihongliang
 * @since 2020/8/7 16:30
 */
public class SGfarm implements Farm {
    @Override
    public Animal newAnimal() {
        System.out.println("新牛出生！");
        return new Cattle();
    }

    @Override
    public Plant newPlant() {
        System.out.println("蔬菜长成！");
        return new Vegetables();
    }
}